# -*- coding: utf-8; mode: snippet -*-
# name: 2D array
# key: array
# contributor: Chen Bin <chenbin DOT sh AT gmail>
# --
const ${1:arr} = new Array(${2:rowCount});
for(let i = 0; i < ${1:$(yas/substr yas-text "[^ ]*")}.length; i++) {
  // please note only primitive value can be filled in
  ${1:$(yas/substr yas-text "[^ ]*")}[i] = new Array(${3:colCount}).fill($0);
}